function exit(){
	  layui.use( 'laydate', function(){
		  var layer = layui.layer;
		  layer.closeAll();
	  });
	 
}
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form
  ,laydate = layui.laydate
  ,layer = layui.layer
  ,layedit = layui.layedit;
  
  
//自定义验证规则
  form.verify({
	  suName: function(value){
     if(value.length == 0){
       return '供应商名称不能为空';
     }
   }
  
   ,suAddress: function(value){
	      if(value.length == 0){
	        return '地址不能为空';	
	      }
	    }
 }); 
 
 
//监听提交
  form.on('submit(formDemo)', function(data){
	  window.parent.location.reload()
	     var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
	     parent.layer.close(index);//关闭当前页  
  	  
  });
 
});



function load(){
	var form = layui.form;
	form.render();
}